OBJS = MyExProj.o Option.o Portfolio.o OptionPricer.o Date.o ConfigFile.o normal.o Utils.o Statistics.o halton.o mtrand.o PayOff.o
CC = g++
DEBUG = -g
CFLAGS = -Wall -c $(DEBUG)
LFLAGS = -Wall $(DEBUG)

hw3 : $(OBJS)
	$(CC) $(LFLAGS) $(OBJS) -o ../hw3

MyExProj.o : MyExProj.cpp OptionPricer.h Option.h Portfolio.h Date.h ConfigFile.h Statistics.h  mtrand.h PayOff.h normal.h Utils.h tnt_jama/*.h 
	$(CC) $(CFLAGS) MyExProj.cpp

Portfolio.o: Portfolio.h Portfolio.cpp Option.h normal.h Date.h
	$(CC) $(CFLAGS) Portfolio.cpp

OptionPricer.o: OptionPricer.h OptionPricer.cpp Option.h halton.h tnt_jama/jama_eig.h tnt_jama/jama_cholesky.h tnt_jama/tnt.h
	$(CC) $(CFLAGS) OptionPricer.cpp

Option.o : Option.h Option.cpp normal.h Date.h
	$(CC) $(CFLAGS) Option.cpp

Date.o : Date.h Date.cpp Utils.h
	$(CC) $(CFLAGS) Date.cpp

ConfigFile.o : ConfigFile.h ConfigFile.cpp 
	$(CC) $(CFLAGS) ConfigFile.cpp

normal.o : normal.h normal.cpp 
	$(CC) $(CFLAGS) normal.cpp

Utils.o : Utils.h Utils.cpp tnt_jama/tnt.h
	$(CC) $(CFLAGS) Utils.cpp

Statistics.o : Statistics.h Statistics.cpp tnt_jama/jama_cholesky.h tnt_jama/tnt.h
	$(CC) $(CFLAGS) Statistics.cpp

mtrand.o : mtrand.h mtrand.cpp
	$(CC) $(CFLAGS) mtrand.cpp

halton.o : halton.h halton.cpp
	$(CC) $(CFLAGS) halton.cpp

PayOff.o : PayOff.h PayOff.cpp 
	$(CC) $(CFLAGS) PayOff.cpp

clean:
	\rm *.o *~ hw3

